import { Controller, Get, Render } from '@nestjs/common';
import { AppService } from './app.service';
import { ApiTags } from '@nestjs/swagger';

@Controller()
@ApiTags('默认')
export class AppController {
  // 依赖注入
  constructor(private readonly appService: AppService) {} //实例

  @Get()
  @Render('index') // 模版渲染
  getHello() {
    return { message: 'nestjs 模版传值', list: this.appService.getHello() };
  }
}
